<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateVMemberAuditTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('v_member_audit', function (Blueprint $table) {
            $table->increments('id');
            $table->bigInteger('member_id')->default(0)->comment('用户ID');
            $table->uuid('uuid')->comment('唯一标识');
            $table->integer('audit_status')->default(10)->comment('审核状态 10待审核，20审核通过，30审核不通过');
            $table->string('audit_des',512)->default('')->comment('审核说明');
            $table->string('auditor',64)->default('')->comment('审核人用户名');
            $table->timestamps();
            $table->index('member_id', 'idx_member_id');
            $table->index('audit_status', 'idx_audit_status');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('v_member_audit');
    }
}
